#include "list.h"

DataTypef Get_New_Data()
{
    DataTypef newdata ;

    scanf("%s%s%f" , newdata.Name , newdata.TV , &newdata.Score);

    return newdata;
}

void myPrintf( DataTypef * Data )
{
    printf("Num:%s \t Name:%s \t Score:%f\n" , Data->Name , Data->TV , Data->Score);
    return ;
}

int main(int argc, char const *argv[])
{
    P_Node_t head = Init_Get_Node(NULL);
    
    for (int i = 0; i < 2; i++)
    {
        DataTypef newdata = Get_New_Data();

        P_Node_t newnode = Init_Get_Node(&newdata);

        Sorting( head  , newnode , Cmp_Name);
    }
    DisPlay(head , myPrintf);

    char ch[32];
    while (1)
    {
        scanf("%s" , ch);
        P_Node_t Name = Find_fun(head , ch);
        if (Name == NULL)
        {
           continue;
        }

        P_Node_t NewData = Update( Name );

        // Del_Fun( head , Name , Name->Next);
    }
    
    DisPlay(head , myPrintf);

    //销毁
    //Destroy(head , head);
    printf("--------\n");

    fun();

    return 0;
}
